<template>
	<view class="JD">
		<view class="part1" v-for="(item,index) in dingdanData" :key="index">
			<view class="title">
				预定日期:
				<text>{{item.startDate}}</text>
			</view>
			<view class="jdpart">
				<view class="hotle-name">
					<!-- <image src="../static/img/hotel.png"></image> -->
					<view class="dingdan-title">{{item.hname}}</view>
					<text>{{item.roomtype}}（包含卫浴) <br></text>
					<text>{{item.startDate}}到-{{item.endDate}}(1晚1间)</text>
				</view>
				<view class="price">
					<view style="color: red;">￥{{item.total}}</view>
					<view>{{item.status}}</view>
				</view>
			</view>
			<view class="part2">
				<button class="btn-delete" size="mini">删除订单</button>
				<button  class="btn-delete" size="mini" @mousedown="gotoComment">待评论</button>
				<button class="btn-delete" size="mini">取消</button>	
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"orderJD",
		data() {
			return {
			}
		},
		props: ['dingdanData'],
		onLoad(){
		},
		mounted() {
		},
		methods:{
			// 跳转到评论页
			gotoComment(){
				uni.navigateTo({
					url:"../pages/evaluate/evaluate",
				})
			},
			// 跳转到酒店详情页
			gotoJDdetails() {
				uni.navigateTo({
					url:"../pages/orderDetails/orderDetails"
				})
			}
		},
	}
</script>

<style>
	.part1 {
		margin-top: 20rpx;
	}
	.order-date {
		background-color: darkgray;
		width: 55%;
		height: 35rpx;
		display: flex;
		border-radius: 50rpx;
		flex-direction: row;
		margin-left: 20rpx;
	}
	.title {
		width: 50%;
		/* height: 50rpx; */
		border-radius: 30rpx;
		display: flex;
		padding-left: 20rpx;
		margin-left: 30rpx;
		background-color: #ccc;
	}
	.dingdan-title{
		font-size: 40rpx;
		font-weight: bold;
		margin-top: 20rpx;
		}	
	.part{
		margin-top: 10rpx;
		height: 200rpx;
		background-color: white;
	}
	.jdpart {
		display: flex;
		justify-content: space-around;
		background-color: #fff;
	}
	.hotle-name image {
		width: 100rpx;
		height: 100rpx;
	}
	.price{
		margin-top: 40rpx;
		align-items: center;
	}
	.part2{
		display: flex;
		width: 100%;
		justify-content: space-around;
		padding-top: 20rpx;
		padding-bottom: 20rpx;
		background-color: #fff;
		}
	.line {
		/* border-bottom: 2rpx 2rpx #cccccc; */
		height: 50rpx;
		background-color: #f1f3f4;
	}
</style>